package com.yztc.orangeentertainment.ui.main.subscribefragment.staritem.starfeedfragment;

import android.content.Context;
import android.os.Handler;

import com.yztc.orangeentertainment.bean.staritembean.FeedListBean;

import java.util.List;
import java.util.Map;

/**
 * Created by My on 2016/10/9.
 */
public class FeedPresenter implements FeedContract.Presenter {
    private FeedContract.View view;
    private FeedModle modle;
    private Handler handler;
    public FeedPresenter(FeedContract.View view,Handler handler) {
        this.view = view;
        this.handler=handler;
        modle=new FeedModle();
    }

    @Override
    public void getStarFeedFromNet(String sid,int page,Context context) {
        modle.getStarFeedAll(sid,page,context, new OnLoadFeedListener() {
            @Override
            public void onSuccess(List<FeedListBean> list) {
                handler.sendEmptyMessage(0);
                view.onLoadStarFeedSuccess(list);
            }

            @Override
            public void onFailure(Exception e) {

            }
        });
    }
}
